package com.example.administrator.netdemo;

import android.os.Bundle;
import android.view.View;

import com.example.administrator.netdemo.base.BaseActivity;


public class MainActivity extends BaseActivity {


    private TestModel model;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {

        model = new TestModel(this);
    }

    public void click(View view) {
        switch (view.getId()) {
            case R.id.btn_ok:
                testOk();
                break;
            case R.id.btn_404:
                test404();
                break;

        }
    }

    private void test404() {
        model.test404(new VMTest.test() {
            @Override
            public void onTest() {

            }

            @Override
            public void onFail(int state) {

            }
        });
    }

    private void testOk() {
        model.testOk(new VMTest.test() {
            @Override
            public void onTest() {

            }

            @Override
            public void onFail(int state) {

            }
        });
    }
}
